#include <stdio.h>
#include <stdlib.h>

//https://www.nowcoder.com/practice/4c49a3a1559141f7a080a48c98cca4cb?tpId=290&tags=&title=&difficulty=0&judgeStatus=0&rp=0&sourceUrl=%2Fexam%2Foj%2Fta%3FtpId%3D290

typedef struct Arr {
    int n;
    int arr[0];
}Arr;

int Campares(const void *num1, const void *num2) {
    return *(int *)num1 - *(int *)num2;
}

int main() {
    int F = 0;
    int count = 0;
    int num = 0;
    scanf("%d", &num);
    Arr *arr = (Arr *) malloc(sizeof(Arr) + num * sizeof(int));
    if (arr == NULL) {
        perror("堆区空间开辟失败:");
    }
    arr->n = num;
    for (int i = 0; i < arr->n; i++) {
        scanf("%d", &arr->arr[i]);
    }
    scanf("%d", &F);
    for (int i = 0; i < arr->n; i++) {
        if (F == arr->arr[i]) {
            count++;
        }
    }
    printf("%d", count);
    return 0;
}